package accessers.impl;

import operations.Operation;
import interfaces.Publisher;
import accessers.DataWriter;

public class DataWriterImpl implements DataWriter{
	private Publisher publisher;
	/**
	 * constructeur
	 * @param publisher
	 */
	public DataWriterImpl(Publisher publisher) {
		this.publisher = publisher;
		((Thread)publisher).start();
	}
	
	public boolean write(String topicName, Operation operation) {
		return publisher.addData(topicName, operation);
	}
}
